home *** CD-ROM | disk | FTP | other *** search
/ Aminet 3 / Aminet 3 - July 1994.iso / Aminet / dev / lang / J4thDemo.lha / Programs / ShowNest.f < prev    next >
Encoding:
Text File  |  1992-09-07  |  960 b   |  36 lines

  1. \ Illustrate how other source files can be INCLUDEd from
  2. \ other source files.  This file INCLUDEs the LINES_DEMO
  3. \ file ...
  4.  
  5. \ Mike Haas
  6.  
  7. \ This INTERPRETED part checks to see if the LINES demo is already
  8. \ compiled.  IF SO, it FORGETS it.
  9.  
  10. EXISTS? lines
  11. .IF
  12.    \
  13.    \ Let's be nice and ask...
  14.    \
  15.    cr ." LINES is already compiled.  Forget it?" y/n cr
  16.    .IF
  17.        FORGET task-Demo_Lines  ( the first word in the file )
  18.    .ELSE
  19.        ." canceled" quit
  20.    .THEN
  21. .THEN
  22.  
  23. \ Now we COULD just
  24. \
  25. \  INCLUDE PROGRAMS/DEMO_LINES
  26. \
  27. \ to compile the demo, but here we'll illustrate INCLUDE?
  28. \ (Conditional compiliation mechanism). This word acts to
  29. \ "check if the first argument exists, and if not, consider
  30. \ thesecond) argument to be a filename, and compile it."
  31. \ (This is a little silly right here, since the above
  32. \ INTERPRETED statements made sure that the LINES word
  33. \ will NOT be found!  But just for illustration...)
  34.  
  35. INCLUDE? LINES PROGRAMS/DEMO_LINES
  36.